package cn.thoughtworks.school.entities.commands;

import cn.thoughtworks.school.entities.Organization;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@NoArgsConstructor
public class CreateOrganizationCommand {
  private String title;

  public Organization build(Long userId) {
    return new Organization(userId, this.title, new Date());
  }
}
